import pydicom
import matplotlib.pyplot as plt

# 读取单张dicom文件
# ds = pydicom.dcmread('./datasets/one_dicom/2-LUNG 3.0  B70f-04083/000000.dcm')
# plt.figure(figsize=(10, 10))
# plt.imshow(ds.pixel_array, cmap='gray')
# plt.show()

def loadFileInformation(filename):
    information = {}
    ds = pydicom.dcmread(filename)
    print(ds)
    information['Instance Creation Date'] = ds.InstanceCreationDate
    information['Study Description'] = ds.StudyDescription
    return information

loadFileInformation("./datasets/one_dicom/2-LUNG 3.0  B70f-04083/")

